1. Field of the Invention
The present invention relates to the field of computer graphics and more particularly to the field of displaying three dimensional (3-D) objects in two-dimensional (2-D) form.
2. Description of the Prior Art
Computer graphics systems for displaying 3-D objects in 2-D form, such as on a video screen, must first define the surface or shape of the object to be displayed. The surface is defined in terms of each of the three coordinates (x, y, and z) of many points (or vertices) that are used to define the surface. Equations are used to specify how the x coordinate, for example, varies with variations of the parameters "s" and "t", for example. As the complexity of the objects to be displayed increases, it is still necessary to minimize both (1) the time required to process the surface equations so as to obtain the values of the x, y, and z coordinates of the vertices that define the surface of the object, and (2) the amount of data that must be stored as the x, y, and z coordinates are computed.
In the past, as the values of the x, y, and z coordinates of the vertices have been obtained, selected vertices have been organized into polygons formed by from 3 to "n" vertices, where "n" is selected according to the complexity of the surface to be displayed. Some of those systems separately identified each polygon. For example, in the Thesis "A Computer Graphics Program for the Generation of Half-Tone Images with Shadows", by K. C. Kelley, published in 1970, (NTIS AD-698 124), for each polygon there was provided a block of information including plane coefficients, reflectivity coefficients, the number of vertices of the polygon and the coordinates of the first through the "n.sup.th " vertices.
Similarly, the Thesis "Applications of B-Spline Approximation to Geometric Problems of Computer-Aided Design", by Richard Riesenfeld, Computer Science, University of Utah, UTEC-CSc-73-126, Mar., 1973, ("Riesenfeld") dealt with individual Bezier polygons (that were open or closed) to define curves that are to be rendered on a graphics display.
In a different approach to managing the data corresponding to the x, y, and z coordinates of the vertices that define an object, Foley and Van Damm, in their text "Fundamentals of Interactive Computer Graphics", ("Foley"), refer to an object defined by a mesh formed by polygons. The vertices were said to be stored in a vertex list and a polygon was said to be defined by a list of pointers into the vertex list. Thus, a polygon made up of vertices 3, 5, 7, and 10 in the vertex list would be represented as P=(3, 5, 7, 10). Foley refers to the storage of each vertex just once, such that considerable space is saved, which appears to indicate that the values of all of the vertices that define the object are obtained at once and stored.
Computer graphics systems for displaying 3-D objects in 2-D form are also now expected to show the object with hidden lines removed and to shade the surface of the object as if a light source were shining on the object. For example, the above-noted Kelley Thesis provided a capability of locating the light source at a point away from the observer.
To provide the hidden line and shading capabilities, the normal to the surface of a polygon (the "polygon normal") has been determined. As reported in the Foley text at pages 582 and 583, Gouraud shading, or intensity interpolation shading, uses such polygon (or surface) normals to obtain the vertex (or point) normal by averaging the polygon normals of all polygons that share a given vertex. The intensity at the given vertex is obtained by using the vertex normal with a shading model. The limitations of such averaging of polygon normals are discussed in the text Principles of Interactive Computer Graphics, by W. M. Newman and R. F. Sproull, McGraw-Hill, 1973, ("Newman"). Such limitations include inaccuracy of the point normal, the increased time required to obtain the point normal due to the large number of surrounding polygons that share the given vertex, and the need to store additional vertex data that is required due to the increased number of surrounding polygons.
With respect to shading capabilities, the intensity at a given point or vertex must be determined. This is done by first obtaining the point normal and then using intensity models to obtain the intensity at the point as a function of the point normal. Point normals have been obtained by taking the cross product of the partial derivatives of the given vertex with respect to parameters such as "s" and "t". Thus, the partial derivatives .sup.dx /.sub.ds and .sup.dx /.sub.dt were used. Having such cross-product, the values of the parameters and other variables in the cross-product equation were then substituted into such equation. Experience indicated that it required prohibitive amounts of computation time to recompute all of the terms of the partial derivative equation with respect to each of the coordinates x, y, and z for each value of the parameters s and t simply to obtain the value of the partial derivatives with respect to x, y, and z. To avoid such extensive computations, the averaging of polygon normals discussed by Newman has been used.
In the dissertation, "A Subdivision Algorithm for Computer Display of Curved Surfaces", by Edwin Catmull, Dec., 1974, UTEC-CSc-74-133, Department of Computer Science, University of Utah.) ("Catmull") it was also recognized that to produce high quality computer-generated images of surfaces and curved solid objects on a raster-scan output device, it was necessary to both accurately represent the surfaces and to control shading and texture. Catmull discussed the difficulties in using polygons to approximate curved surfaces. Catmull referred to a report by Henri Gouraud, "Computer Display of Curved Surfaces", Department of Computer Science, University of Utah, UTEC-CSc-71-113, Jun., 1971, who associated a scalar light intensity value with each vertex of a polygon. Catmull also referred to a report by Bui Tuong-Phong, entitled "Illumination for Computer-Generated Images", Department of Computer Science, University of Utah, UTEC-CSc-71-113, Jun. 1971. Phong interpolated the entire surface normal vector between vertices and edges instead of the scalar intensity values that Gouraud used. This yielded a normal at every display point, (or vertex) which was used to calculate intensity. Catmull noted that such normal was not the mathematically correct one. As understood, inaccuracy results from the amount of interpolation between points that are calculated exactly.
Catmull also discussed using surface normals for intensity calculations (page 34) and referred to Phong who calculated intensity using the surface normal and the light sources. This was complicated because the equation of the normal to a bi-cubic patch is a fifth degree polynomial. This method requires more information in order to obtain the tangents and, of course, it requires the extra computation involved in taking a cross product at every point.
In a thesis by James Henry Clark entitled, "3-D Design of Free-Form B-Spline Surfaces", Department of Computer Science, University of Utah, UTEC-CSc-74-120, Sept., 1974, ("Clark"), page 27 refers to computation of an equation (2.15) for each point of a surface. The equation (2.15) is for S as a function of s and t. The point is made that to perform computations of 16 times for each value of s and t simply to compute one vertex requires too many computations. On page 28, to reduce the computations a table look-up is suggested based on pre-computing the equation using values of s and t. Then, at initialization time, the surface is completely evaluated and stored in tabular form.